import { UPDATEPAGECITYLOCATION } from '../types/pagecitylocation'
import { handleActions } from 'redux-actions'

const Schema = {
  showEmpty: false,
  requestOverFirst: false,
  networkerror: false,
  breaklocation: false,
  havenoshopbyshare: false,
  recentlyList: [],
  cityList: []
  // {
  // 	letter: 'B',
  // 		dataSource: [{name: '北京市'}, {name: '保定市'}]
  // }, {
  // 	letter: 'C',
  // 		dataSource: [{name: '长春市'}, {name: '常州市'}, {name: '长春市'}]
  // }, {
  // 	letter: 'D',
  // 		dataSource: [{name: '长春市'}, {name: '常州市'}, {name: '长春市'}, {name: '常州市'}]
  // }
}

export default handleActions(
  {
    [UPDATEPAGECITYLOCATION] (state, action) {
      return {
        ...state,
        ...action.payload
      }
    }
  },
  Schema
)
